package helper

import (
	"os"
	"os/exec"
	"path/filepath"
)

func GetRunPath() (runPath string, err error) {
	file, err := exec.LookPath(os.Args[0])
	if err != nil {
		return
	}
	path, err := filepath.Abs(file)
	if err != nil {
		return
	}
	runPath = filepath.Dir(path)
	return
}
